package com.hc.model.code03.test3;

/**
 * @version v1.0
 * @ClassName: SDAdapterTF
 * @Description: 适配器类的实现
 *      通过对象的方式实现
 *      1.实现接口
 *      2.组合对象
 * @Author: HC
 */
public class SDAdapterTF implements SDCard{

    private final TFCard tfCard = new TFCardImpl();

    @Override
    public String readSD() {
        System.out.println("adapter read tf card");
        return tfCard.readTF();
    }

    @Override
    public void writeSD(String msg) {
        System.out.println("adapter write tf card");
        tfCard.writeTF(msg);
    }
}
